home *** CD-ROM | disk | FTP | other *** search
- /**
- * Scout - The Amiga System Monitor
- *
- *------------------------------------------------------------------
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * You must not use this source code to gain profit of any kind!
- *
- *------------------------------------------------------------------
- *
- * @author Andreas Gelhausen
- * @author Richard Körber <rkoerber@gmx.de>
- */
-
-
-
- #include "system_headers.h"
-
- APTR BT_WinUpdate,BT_WinPrint,BT_WinClose,BT_WinToFront,BT_WinMore,BT_WinExit;
- APTR wintext,winlist;
- APTR winmoretext0,winmoretext1,winmoretext2,winmoretext3,winmoretext4;
- APTR winmoretext5,winmoretext6a,winmoretext6b,winmoretext7a,winmoretext7b,winmoretext8,winmoretext9;
- APTR winmoretext10,winmoretext11,winmoretext12,winmoretext13,winmoretext14;
- APTR screenmoretext0,screenmoretext1,screenmoretext2,screenmoretext3;
- APTR screenmoretext4,screenmoretext5a,screenmoretext5b,screenmoretext6,screenmoretext7;
- APTR screenmoretext8,screenmoretext9,screenmoretext10;
-
- static APTR WinPool = NULL;
-
-
- void CloseScreenAll (struct Screen *screen) {
- struct Window *win,*nextwin;
-
- win = screen->FirstWindow;
- while (win) {
- nextwin = win->NextWindow;
- CloseWindow (win);
- win = nextwin;
- }
- CloseScreen (screen);
- }
-
- __asm __saveds LONG winlist_dspfunc(register __a2 char **array, register __a1 struct WinEntry *winentry, register __a0 struct Hook *hook)
- {
- if (winentry) {
- *array++ = winentry->wn_address;
- *array++ = winentry->wn_position;
- *array++ = winentry->wn_size;
- *array++ = winentry->wn_flags;
- *array++ = winentry->wn_idcmp;
- *array++ = winentry->wn_title;
- *array = NULL;
- } else {
- *array++ = ESC "bAddress";
- *array++ = ESC "bPos(x,y)";
- *array++ = ESC "bSize(x,y)";
- *array++ = ESC "bFlags";
- *array++ = ESC "bIDCMP";
- *array++ = ESC "bTitle";
- *array = NULL;
- }
- return(0);
- }
-
- struct Hook winlist_dsphook = {
- {NULL, NULL},
- (ULONG (* )())winlist_dspfunc,
- NULL, NULL
- };
-
- void FreeWindows (void)
- {
- MyFreePoolStructs(&WinPool, wintext, NULL, winlist);
- }
-
- int GetWindows (struct WinEntry **first) {
- struct WinEntry *winentry,*previous = NULL;
- struct Screen *screen;
- struct Window *window;
-
- int wincnt = 0;
- *first = 0;
-
- if (!WinPool) WinPool = tbCreatePool(MEMF_CLEAR, 4096, 4096);
-
- if (clientstate) {
- if (SendDaemon ("GetWinList")) {
- while ((winentry = tbAllocPooled(WinPool, sizeof(struct WinEntry))) \
- && (ReceiveDecodedEntry ((UBYTE *) winentry, sizeof (struct WinEntry)))) {
- if (! IsHex (winentry->wn_address, (long *) &winentry->wn_adr))
- IsHex (winentry->wn_address + 2, (long *) &winentry->wn_adr);
-
- if (! *first)
- *first = winentry;
- if (previous)
- previous->wn_next = winentry;
-
- wincnt++;
- previous = winentry;
- }
- }
- } else {
- screen = FIRSTSCREEN;
-
- while ((screen) && (winentry = tbAllocPooled(WinPool, sizeof(struct WinEntry)))) {
- if (! *first)
- *first = winentry;
- if (previous)
- previous->wn_next = winentry;
-
- winentry->wn_adr = (char *) screen;
-
- _sprintf (winentry->wn_address, HELL "$%08lx", screen);
- _sprintf (winentry->wn_position, HELL "%4ld,%-4ld", screen->LeftEdge, screen->TopEdge);
- _sprintf (winentry->wn_size, HELL "%4ld,%-4ld", screen->Width, screen->Height);
- _sprintf (winentry->wn_flags, HELL "$%04lx",screen->Flags);
- strcpy (winentry->wn_idcmp, HELL "---------");
- _sprintf (winentry->wn_title, HELL "%-."TEXTLENGTHCHAR"s", nonetest (screen->Title));
- winentry->wn_type = 'S';
-
- wincnt++;
- previous = winentry;
- window = screen->FirstWindow;
-
- while ((window) && (winentry = tbAllocPooled(WinPool, sizeof(struct WinEntry)))) {
- if (! *first)
- *first = winentry;
- if (previous)
- previous->wn_next = winentry;
-
- winentry->wn_adr = (char *) window;
- _sprintf (winentry->wn_address, "$%08lx", window);
- _sprintf (winentry->wn_position, "%4ld,%-4ld", window->LeftEdge, window->TopEdge);
- _sprintf (winentry->wn_size, "%4ld,%-4ld", window->Width, window->Height);
- _sprintf (winentry->wn_flags, "$%08lx", window->Flags);
- _sprintf (winentry->wn_idcmp, "$%08lx", window->IDCMPFlags);
- _sprintf (winentry->wn_title, "%-."TEXTLENGTHCHAR"s", nonetest (window->Title));
- winentry->wn_type = 'W';
-
- wincnt++;
- previous = winentry;
- window = window->NextWindow;
- }
- screen = screen->NextScreen;
- }
- }
- return (wincnt);
- }
-
- void PrintWindows (char *filename) {
- int i=1;
- BPTR handle;
- struct WinEntry *entryp = NULL;
-
- handle = HandlePrintStart (filename);
- if ((handle) && (PrintOneLine (handle, "\n Address Pos(x,y) Size(x,y) Flags IDCMP Title\n\n"))) {
- if (! WI_Windows) {
- i = GetWindows (&entryp);
- }
- if (i) {
- for (i=0;;i++) {
- if (WI_Windows)
- DoMethod (winlist,MUIM_List_GetEntry,i,&entryp);
- if (!entryp) break;
-
- if (entryp->wn_type == 'S') {
- _sprintf (tmpstr2, " $%08lx %s %s %-9.9s %s %-26.26s\n", entryp->wn_adr, entryp->wn_position+2, entryp->wn_size+2, entryp->wn_flags+2, entryp->wn_idcmp+2, entryp->wn_title+2);
- } else {
- _sprintf (tmpstr2, " $%08lx %s %s %-9.9s %s %-26.26s\n", entryp->wn_adr, entryp->wn_position, entryp->wn_size, entryp->wn_flags, entryp->wn_idcmp, entryp->wn_title);
- }
-
- if (! (PrintOneLine (handle, tmpstr2)))
- break;
-
- if (! WI_Windows)
- entryp = entryp->wn_next;
- }
- }
- }
- HandlePrintStop();
- }
-
- void ShowWindows (void) {
- struct WinEntry *win;
-
- ApplicationSleep();
- set(winlist,MUIA_List_Quiet,TRUE);
- set(BT_WinClose, MUIA_Disabled, TRUE);
- set(BT_WinToFront, MUIA_Disabled, TRUE);
- set(BT_WinMore, MUIA_Disabled, TRUE);
-
- FreeWindows();
-
- GetWindows (&win);
-
- while (win) {
- InsertBottomEntry (winlist, (APTR *) &win);
- win = win->wn_next;
- }
-
- AwakeApplication();
- set(winlist,MUIA_List_Quiet,FALSE);
- }
-
- void SendWinList (void) {
- struct WinEntry *win;
-
- FreeWindows();
- GetWindows (&win);
-
- while (win) {
- SendEncodedEntry ((UBYTE *) win, sizeof (struct WinEntry));
- win = win->wn_next;
- }
- FreeWindows();
- }
-
- void GetWindowMore (struct Window *win) {
- unsigned char *title = "WINDOW: ";
- struct TextFont *font;
- struct WinFree *ptr;
-
- if (ptr = AllocWinFree()) {
- ptr->wf_Window = (APTR) WindowObject,
-
- // MUIA_Window_SizeGadget, FALSE,
- MUIA_HelpNode, WindowsText,
- MUIA_Window_ID, MakeDetailID('.','W','I','N'),
- WindowContents, HGroup,
- Child, VGroup, MUIA_Group_SameWidth, TRUE,
- //#ifndef WINDOW_PROBLEMS
- Child, MyLabel2 ("Title:"),
- //#endif
- Child, MyLabel2 ("ScreenTitle:"),
- Child, MyLabel2 ("LeftEdge:\nTopEdge:\nMinWidth:\nMinHeight:\nBorderRight:\nBorderBottom:"),
- Child, MyLabel2 ("NextWindow:\nFirstRequest:\nRPort:\nParent:\nExtData:"),
- Child, MyLabel2 ("IDCMPFlags:"),
- Child, MyLabel2 ("ReqCount:"),
- Child, MyLabel2 ("UserPort:"),
- Child, MyLabel2 ("WindowPort:"),
- End,
- Child, VGroup, MUIA_Group_SameWidth, TRUE,
- //#ifndef WINDOW_PROBLEMS
- Child, winmoretext0 = MyTextObject(),
- //#endif
- Child, winmoretext1 = MyTextObject(),
- Child, HGroup,
- Child, winmoretext2 = MyTextObject2(),
- Child, MyLabel ("Width:\nHeight:\nMaxWidth:\nMaxHeight:\nPtrHeight:\nPtrWidth:"),
- Child, winmoretext3 = MyTextObject2(),
- Child, MyLabel ("MouseY:\nMouseX:\nBorderLeft:\nBorderTop:\nXOffset:\nYOffset:"),
- Child, winmoretext4 = MyTextObject2(),
- Child, MyLabel ("DetailPen:\nBlockPen:\nGZZMouseX:\nGZZMouseY:\nGZZWidth:\nGZZHeight:"),
- Child, winmoretext5 = MyTextObject2(),
- End,
- Child, HGroup,
- Child, VGroup, MUIA_Group_SameWidth, TRUE, MUIA_Weight, 0,
- Child, winmoretext6a = MyTextObject(),
- Child, winmoretext6b = KeyButtonF ('l', win->IDCMPFlags),
- Child, winmoretext9 = MyTextObject(),
- Child, winmoretext10 = MyTextObject(),
- Child, winmoretext11 = MyTextObject(),
- End,
- Child, VGroup, MUIA_Group_SameWidth, TRUE, MUIA_Weight, 60,
- Child, MyLabel ("Flags:"),
- Child, MyLabel ("DMRequest:\nBorderRPort:\nDescendant:\nMessageKey:\nUserData:"),
- Child, MyLabel ("IFont:"),
- Child, MyLabel ("-> SigTask:"),
- Child, MyLabel ("-> SigTask:"),
- End,
- Child, VGroup,
- Child, HGroup,
- Child, VGroup, MUIA_Group_SameWidth, TRUE, MUIA_Weight, 0,
- Child, winmoretext7a = KeyButtonF ('l', win->Flags),
- Child, winmoretext7b = MyTextObject(),
- End,
- Child, HGroup, MUIA_Weight, 60,
- Child, MyLabel ("MenuStrip:\nWScreen:\nFirstGadget:\nPointer:\nCheckMark:\nWLayer:"),
- End,
- Child, winmoretext8 = MyTextObject2(),
- End,
- Child, winmoretext12 = MyTextObject(),
- Child, winmoretext13 = MyTextObject(),
- Child, winmoretext14 = MyTextObject(),
- End,
- End,
- End,
- End, End;
-
- if (ptr->wf_Window) {
- MySetContents (winmoretext2, ESC "r%ld\n%ld\n%ld\n%ld\n%ld\n%ld", win->LeftEdge, win->TopEdge, win->MinWidth, win->MinHeight, win->BorderRight, win->BorderBottom);
- MySetContents (winmoretext3, ESC "r%ld\n%ld\n%ld\n%ld\n%ld\n%ld", win->Width, win->Height, win->MaxWidth, win->MaxHeight, win->PtrHeight, win->PtrWidth);
- MySetContents (winmoretext4, ESC "r%ld\n%ld\n%ld\n%ld\n%ld\n%ld", win->MouseY, win->MouseX, win->BorderLeft, win->BorderTop, win->XOffset, win->YOffset);
- MySetContents (winmoretext5, ESC "r%ld\n%ld\n%ld\n%ld\n%ld\n%ld", win->DetailPen, win->BlockPen, win->GZZMouseX, win->GZZMouseY, win->GZZWidth, win->GZZHeight);
- MySetContents (winmoretext6a, ESC "r$%08lx\n$%08lx\n$%08lx\n$%08lx\n$%08lx", win->NextWindow, win->FirstRequest, win->RPort, win->Parent, win->ExtData);
- MySetContents (winmoretext7b, ESC "r$%08lx\n$%08lx\n$%08lx\n$%08lx\n$%08lx", win->DMRequest, win->BorderRPort, win->Descendant, win->MessageKey, win->UserData);
- MySetContents (winmoretext8, ESC "r$%08lx\n$%08lx\n$%08lx\n$%08lx\n$%08lx\n$%08lx", win->MenuStrip, win->WScreen, win->FirstGadget, win->Pointer, win->CheckMark, win->WLayer);
- MySetContents (winmoretext9, ESC "r%ld", win->ReqCount);
- MySetContents (winmoretext10, ESC "r$%08lx", win->UserPort);
- MySetContents (winmoretext11, ESC "r$%08lx", win->WindowPort);
-
- HandleFlagsButtonPressed (winmoretext6b, ptr, "(WINDOW)", "IDCMPFlags", win->IDCMPFlags, (struct LongFlag *) &idcmp_flags, NULL, 'l');
- HandleFlagsButtonPressed (winmoretext7a, ptr, "(WINDOW)", "Flags", win->Flags, (struct LongFlag *) &wflg_flags, (struct MaskedLongFlag *) &wflg_flags2, 'l');
- HandleWindowOpen (ptr, title, nonetest (win->Title));
-
- //#ifndef WINDOW_PROBLEMS
- MySetContents (winmoretext0, nonetest (win->Title));
- //#endif
- MySetContents (winmoretext1, nonetest (win->ScreenTitle));
-
- font = win->IFont;
- MySetContents (winmoretext12, "%s/%ld", font->tf_Message.mn_Node.ln_Name, font->tf_YSize);
-
- if (win->UserPort) {
- MySetContentsHealed (winmoretext13, nonetest (GetTaskName (win->UserPort->mp_SigTask)));
- }
-
- if (win->WindowPort) {
- MySetContentsHealed (winmoretext14, nonetest (GetTaskName (win->WindowPort->mp_SigTask)));
- }
-
- HandleWindowClose (ptr);
- }
- }
- }
-
- void GetScreenMore (struct Screen *screen) {
- unsigned char *title = "SCREEN: ";
- struct TextAttr *font;
- struct WinFree *ptr;
- char buf[sizeof(struct NameInfo)];
- APTR handle;
- ULONG ID;
-
- struct List *publist;
- struct PubScreenNode *pubscreen;
- struct MonitorSpec *mspc;
-
- if (ptr = AllocWinFree()) {
- APTR AddGroup1, AddGroup2, AddGroup3;
-
- ptr->wf_Window = (APTR) WindowObject,
-
- // MUIA_Window_SizeGadget, FALSE,
- MUIA_HelpNode, WindowsText,
- MUIA_Window_ID, MakeDetailID('.','W','I','N'),
- WindowContents, HGroup,
- Child, AddGroup1 = VGroup,
- //#ifndef WINDOW_PROBLEMS
- Child, MyLabel2 ("Title:"),
- //#endif
- Child, MyLabel2 ("DefaultTitle:"),
- Child, MyVSpace(0),
- Child, MyLabel2 ("LeftEdge:\nTopEdge:\nWidth:\nHeight:\nDetailPen:"),
- Child, MyVSpace(0),
- Child, MyLabel2 ("ScreenMode:"),
- Child, MyLabel2 ("NextScreen:\nFirstWindow:"),
- End,
- Child, AddGroup2 = VGroup, MUIA_Group_SameWidth, TRUE,
- //#ifndef WINDOW_PROBLEMS
- Child, screenmoretext0 = MyTextObject(),
- //#endif
- Child, screenmoretext1 = MyTextObject(),
-
- Child, HGroup,
- Child, screenmoretext2 = MyTextObject2(),
- Child, MyLabel ("BarVBorder:\nBarHBorder:\nMenuVBorder:\nMenuHBorder:\nBlockPen:"),
- Child, screenmoretext3 = MyTextObject2(),
- Child, MyLabel ("WBorTop:\nWBorLeft:\nWBorRight:\nWBorBottom:\nDepth:"),
- Child, screenmoretext4 = MyTextObject2(),
- Child, VGroup,
- Child, MyLabel ("MouseY:\nMouseX:\nBarHeight:\nSaveColor0:"),
- Child, MyLabel ("Flags:"),
- End,
- Child, VGroup, MUIA_Group_SameWidth, TRUE, MUIA_Weight, 0,
- Child, screenmoretext5a = MyTextObject(),
- Child, screenmoretext5b = KeyButtonF ('w', screen->Flags),
- End,
- End,
-
- Child, HGroup, MUIA_Group_SameWidth, TRUE,
- Child, screenmoretext10 = MyTextObject(),
- Child, HGroup,
- Child, MyLabel2 ("Font:"),
- Child, screenmoretext9 = MyTextObject(),
- End,
- End,
-
- Child, HGroup,
- Child, screenmoretext6 = MyTextObject2(),
- Child, MyLabel ("FirstGadget:\nBarLayer:"),
- Child, screenmoretext7 = MyTextObject2(),
- Child, MyLabel ("ExtData:\nUserData:"),
- Child, screenmoretext8 = MyTextObject2(),
- End,
- End,
- End, End;
-
- if (ptr->wf_Window) {
- MySetContents (screenmoretext2, ESC "r%ld\n%ld\n%3ld\n%ld\n%ld", screen->LeftEdge, screen->TopEdge, screen->Width, screen->Height, screen->DetailPen);
- MySetContents (screenmoretext3, ESC "r%ld\n%ld\n%3ld\n%ld\n%ld", screen->BarVBorder, screen->BarHBorder, screen->MenuVBorder, screen->MenuHBorder, screen->BlockPen);
- MySetContents (screenmoretext4, ESC "r%ld\n%ld\n%3ld\n%ld\n%ld", screen->WBorTop, screen->WBorLeft, screen->WBorRight, screen->WBorBottom, GetBitMapAttr(screen->RastPort.BitMap, BMA_DEPTH));
- MySetContents (screenmoretext5a, ESC "r%ld\n%ld\n%ld\n%ld", screen->MouseY, screen->MouseX, screen->BarHeight, screen->SaveColor0);
-
- MySetContents (screenmoretext6, ESC "r$%08lx\n$%08lx", screen->NextScreen, screen->FirstWindow);
- MySetContents (screenmoretext7, ESC "r$%08lx\n$%08lx", screen->FirstGadget, screen->BarLayer);
- MySetContents (screenmoretext8, ESC "r$%08lx\n$%08lx", screen->ExtData, screen->UserData);
-
- font = screen->Font;
- MySetContents (screenmoretext9, "%s/%ld", font->ta_Name, font->ta_YSize);
-
- if (publist = LockPubScreenList()) {
- pubscreen = (struct PubScreenNode *) publist->lh_Head;
-
- while (pubscreen->psn_Node.ln_Succ != 0) {
- if (pubscreen->psn_Screen == screen) {
- DoMethod (AddGroup1,OM_ADDMEMBER,MyLabel2 ("PublicName:"));
- DoMethod (AddGroup1,OM_ADDMEMBER,MyLabel2 ("SigTask:"));
-
- Child, AddGroup3 = HGroup,
- Child, VGroup,
- Child, HGroup,
- Child, screenmoretext2 = MyTextObject(),
- Child, HGroup, MUIA_Weight, 0,
- Child, MyLabel ("Flags:"),
- Child, screenmoretext3 = KeyButtonF ('w', pubscreen->psn_Flags),
- End,
- End,
- Child, screenmoretext6 = MyTextObject(),
- End,
- Child, VGroup,
- Child, MyLabel2 ("Visitors:"),
- Child, MyLabel2 ("SigBit:"),
- End,
- Child, VGroup, MUIA_Group_SameWidth, TRUE,
- Child, screenmoretext4 = MyTextObject(),
- Child, screenmoretext5a = MyTextObject2(),
- End,
- End;
- MySetContents (screenmoretext2, pubscreen->psn_Node.ln_Name);
- HandleFlagsButtonPressed (screenmoretext3, ptr, "(SCREEN)", "psn_Flags", pubscreen->psn_Flags, (struct LongFlag *) &psn_flags, NULL, 'w');
- MySetContents (screenmoretext4, ESC "r%ld", pubscreen->psn_VisitorCount);
- if (pubscreen->psn_SigBit != 255)
- MySetContents (screenmoretext5a, ESC "r%3ld", pubscreen->psn_SigBit);
- else
- MySetContents (screenmoretext5a, ESC "r---");
- MySetContents (screenmoretext6, nonetest (GetTaskName (pubscreen->psn_SigTask)));
- DoMethod (AddGroup2,OM_ADDMEMBER,AddGroup3);
- }
- pubscreen = (struct PubScreenNode *) pubscreen->psn_Node.ln_Succ;
- }
-
- UnlockPubScreenList();
- }
-
- HandleFlagsButtonPressed (screenmoretext5b, ptr, "(SCREEN)", "Flags", screen->Flags, (struct LongFlag *) &scr_flags, (struct MaskedLongFlag *) &scr_flags2, 'w');
- HandleWindowOpen (ptr, title, nonetest (screen->Title));
- //#ifndef WINDOW_PROBLEMS
- MySetContents (screenmoretext0, nonetest (screen->Title));
- //#endif
- MySetContents (screenmoretext1, screen->DefaultTitle);
- HandleWindowClose (ptr);
-
- if (ID = GetVPModeID (&screen->ViewPort)) {
- if (handle = FindDisplayInfo (ID)) {
- if (GetDisplayInfoData(handle, (UBYTE *) &buf, sizeof (struct NameInfo), DTAG_NAME, 0)) {
- _sprintf (tmpstr, "%s ($%08lx)", ((struct NameInfo *) &buf)->Name, ID);
- MySetContents (screenmoretext10, tmpstr);
- } else {
- if (mspc = OpenMonitor (NULL, ID)) {
- int i = 0;
- struct DimensionInfo diminfo;
-
- strcpy (tmpstr, ((struct Node *) mspc)->ln_Name);
- while (tmpstr[i] = toupper(tmpstr[i])) {
- if (tmpstr[i] == '.') {
- strcpy (&tmpstr[i++], ":");;
- break;
- }
- i++;
- }
- GetDisplayInfoData (handle, (UBYTE *) &diminfo, sizeof (struct DimensionInfo), DTAG_DIMS, 0);
- //aprintf ("MONITOR: %ls %ld x %ld\n", tmpstr, diminfo.Nominal.MaxX - diminfo.Nominal.MinX, diminfo.Nominal.MaxY - diminfo.Nominal.MinY);
- _sprintf (&tmpstr[i], "%ld x %ld ($%08lx)", diminfo.Nominal.MaxX - diminfo.Nominal.MinX + 1, diminfo.Nominal.MaxY - diminfo.Nominal.MinY + 1, ID);
- MySetContents (screenmoretext10, tmpstr);
- CloseMonitor (mspc);
- }
- }
- }
- }
- }
- }
- }
-
-
- char windows_title[WINDOWTITLELEN];
-
- void WindowsWindow (BOOL state) {
- if (state) {
- if (WI_Windows) {
- ShowWindows();
- } else {
- WI_Windows = WindowObject,
- MUIA_Window_Title, MyGetWindowTitle (windows_title, "WINDOWS & SCREENS"),
- MUIA_HelpNode, WindowsText,
- MUIA_Window_ID, MakeListID('W','I','N','D'),
- WindowContents, VGroup,
- Child, winlist = MyListviewObject ("COL=0 DELTA=8,COL=1 DELTA=8 P=\33c,COL=2 DELTA=8 P=\33c,COL=3 DELTA=8,COL=4 DELTA=8,COL=5",&winlist_dsphook),
- Child, wintext = MyTextObject(),
- Child, MyVSpace(2),
- Child, HGroup, MUIA_Group_SameSize, TRUE,
- Child, BT_WinUpdate = KeyButtonA (UpdateText,ID_WINUPDATE),
- Child, BT_WinPrint = KeyButtonA (PrintText ,ID_WINPRINT),
- Child, BT_WinClose = KeyButtonA (CloseText ,ID_WINCLOSE),
- Child, BT_WinToFront = KeyButtonA (ToFrontText ,ID_WINTOFRONT),
- Child, BT_WinMore = KeyButtonA (MoreText ,ID_WINMORE),
- Child, BT_WinExit = KeyButtonA (ExitText ,ID_WINEXIT),
- End,
- End, End;
-
- DoMethod (AP_Scout,OM_ADDMEMBER,WI_Windows);
- DoMethod (WI_Windows,MUIM_Window_SetCycleChain,winlist,BT_WinUpdate,BT_WinPrint,BT_WinClose,BT_WinToFront,BT_WinMore,BT_WinExit,NULL);
-
- SetCloseRequest (WI_Windows,ID_WINEXIT);
- SetListActive (winlist,ID_WINLV_ACTIVE);
- SetListviewDoubleClick (winlist,ID_WINMORE);
-
- SetWindowOpen (WI_Windows,winlist,ID_WINEXIT);
-
- ShowWindows();
- }
- } else if ((! state) && (WI_Windows)) {
- SetWindowClose (WI_Windows,TRUE);
-
- FreeWindows();
-
- DoMethod (AP_Scout,OM_REMMEMBER,WI_Windows);
- MUI_DisposeObject (WI_Windows);
- WI_Windows = NULL;
- winlist = NULL;
- }
- }
-
-
-